﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CMS.Data;
using CMS.Service.Repository;

namespace CMSApplication.Areas.Administration.Models
{
    public class CustomerSearchModel
    {
        public string Keys { get; set; }
        public int Type { get; set; }
        public DateTime CreatedOnFrom { get; set; }
        public DateTime CreatedOnTo { get; set; }

        public SelectList SLType { get; set; }

        public void GetDataForSL()
        {
            var customer_type_lst = new List<Customer_Type>() { new Customer_Type() { Id = 0, Name = "- - Tất cả - -" } };
            var customer_type_srv = new CustomerTypeRepository();
            customer_type_lst.AddRange(customer_type_srv.List());
            SLType = new SelectList(customer_type_lst, "Id", "Name");
        }

        public CustomerSearchModel() { }
    }
}
